
if __name__ == '__main__':
    wenjian = open(file="python中的异常处理.py",mode="r",encoding="utf-8")
    content = wenjian.read()
    #content1 = wenjian.readlines()
    #content2 = wenjian.read.(10)
    print(content)
    wenjian.close()

    wenjian2 = open(file="a.txt",mode="a",encoding="utf-8")
    str1 = "test50 very good!"
    wenjian2.write(str1)
    wenjian2.close()

    wenjian3 = open(file="python中的异常处理.py",mode="r",encoding="utf-8")
    wenjian4 = open(file="b.txt",mode="w",encoding="utf-8")
    wenjian4.write(wenjian3.read())
    wenjian3.close()
    wenjian4.close()
